// 太多了占空间，常见尺寸就这么多
@for $i from 0 through 30 {
  .m-#{$i} {
    margin: ($i)+px;
  }
  .m-t-#{$i} {
    margin-top: ($i)+px;
  }
  .m-b-#{$i} {
    margin-bottom: ($i)+px;
  }
  .m-l-#{$i} {
    margin-left: ($i)+px;
  }
  .m-r-#{$i} {
    margin-right: ($i)+px;
  }

  .p-#{$i} {
    padding: ($i)+px;
  }
  .p-t-#{$i} {
    padding-top: ($i)+px;
  }
  .p-b-#{$i} {
    padding-bottom: ($i)+px;
  }
  .p-l-#{$i} {
    padding-left: ($i)+px;
  }
  .p-r-#{$i} {
    padding-right: ($i)+px;
  }

  .fz-#{$i} {
    font-size: ($i)+px;
  }
}

@for $i from 0 through 200 {
  .w#{$i} {
    width: ($i)+px;
  }
  .h#{$i} {
    height: ($i)+px;
  }
}

//圆角
@for $i from 0 through 30 {
  .b-radius-#{$i} {
    border-radius: ($i)+px;
  }
}


/* 公共的样式 */

page {
  background: #f8f8f8;
}

// 安全区域
.safearea-box {
  height: constant(safe-area-inset-bottom);
  height: env(safe-area-inset-bottom);
  width: 100%;
  background: #fff;

  &.fixed {
    position: fixed;
    bottom: 0;
    left: 0;
  }
}
/** 安全区域 **/
.p-b-safe-area{
  padding-bottom: constant(safe-area-inset-bottom);
  padding-bottom: env(safe-area-inset-bottom);
}

.m-b-safe-area{
  margin-bottom: constant(safe-area-inset-bottom);
  margin-bottom: env(safe-area-inset-bottom);
}

.b-safe-area{
  bottom: constant(safe-area-inset-bottom);
  bottom: env(safe-area-inset-bottom);
}

.hr {
  background: #f2f2f2;
}




/* 颜色 */
.c0 {
  color: #000;
}

.c1 {
  color: #111;
}

.c2 {
  color: #222;
}

.c3 {
  color: #333;
}

.c4 {
  color: #444;
}

.c5 {
  color: #555;
}

.c6 {
  color: #666;
}

.c7 {
  color: #777;
}

.c8 {
  color: #888;
}

.c9 {
  color: #999;
}

.color-white {
  color: #fff;
}



.b-radius-aircle {
  border-radius: 50%;
  overflow: hidden
}

/* flex布局 */
.flex1 {
  flex: 1;
}
.flex {
  display: flex;



  &-row {
    flex-direction: row;
  }

  &-column {
    flex-direction: column;
  }

  //水平
  &-vertical-c {
    align-items: center;
  }

  &-vertical-b {
    align-items: flex-end;
  }

  &-vertical-t {
    align-items: flex-end;
  }

  //内容分布
  &-justify-c {
    justify-content: center;
  }

  &-justify-l {
    justify-content: flex-start;
  }

  &-justify-r {
    justify-content: flex-end;
  }

  &-justify-between {
    justify-content: space-between;
  }
  &-wrap{
    flex-wrap: wrap;
  }
}

/* cell，一般用于表单 */
.group-cell {
  padding-left: 20rpx;
  box-sizing: border-box;
  margin-bottom: 30rpx;

  &:last-child {
    margin-bottom: 0;
  }

  .cell-item {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding: 20rpx 0;

    &:last-child {
      border-bottom: none;
    }

    .label {

      color: #999;
    }

    .content {
      flex: 1;
      text-align: right;
      color: #444;
    }

    .right {
      margin: 0 10px;
    }
  }
}

.form {
  .group-cell {
    .cell-item {
      .label {
        &:not(:empty) {
          width: 180rpx;
        }

        color: #333;
      }
    }
  }
}

.scroll {

  &-box {
    background: white;
    overflow-y: hidden;
    overflow-x: scroll;

    &::-webkit-scrollbar {
      display: none;
    }

  }

  &-item {
    display: inline-block;

    &.active {
      color: $fun-primary-color;
      border-bottom: 2px solid $fun-primary-color;
    }
  }

}

.grid {

  &-box {
    display: flex;
    flex-wrap: wrap;
  }

  &-item {
    text-align: center;

    .icon-img {

    }

    .icon {

    }

    .title {

    }
  }
}

/* 边框样式 */
.bor {
  border: 1px solid $fun-border-color;
}

.bor-b {
  border-bottom: 1px solid $fun-border-color;
  //&:last-child{
  //  border-bottom: none;
  //}
}

.bor-r {
  border-right: 1px solid $fun-border-color;
}

.bor-l {
  border-left: 1px solid $fun-border-color;
}

.bor-t {
  border-top: 1px solid $fun-border-color;
}

.nobor {
  border-bottom: none;
  border-left: none;
  border-right: none;
  border-bottom: none;
}


.img-cover {
  @include cover-img();
}

.img-contain {
  @include cover-img(contain);
}


.text {
  &-underline {
    text-decoration: underline;
  }

  &-through {
    text-decoration: line-through;
  }

  &-nowrap {
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
  }

  &-center {
    text-align: center;
  }

  &-left {
    text-align: left;
  }

  &-right {
    text-align: right;
  }
}


.block {
  &-title {
    display: flex;

    &-text {
      flex: 1;
      font-size: 18px;
      color: #333;
    }

    &-more {
      display: flex;

    }
  }

  &-nav {
    &-item {

    }
  }
}


//原价和现价
.price-selling {
  color: $fun-selling-color;
}

.price-market {
  color: $fun-market-color;
}

.bg-white {
  background: #fff;
}

.img-full {
  width: 100%;
  height: 100%
}

.fz-b {
  font-weight: bold
}


.page-section-title {
  padding: 15px;
  display: flex;
  align-items: center;
  justify-content: center;

  .before, .after {
    width: 23px;
    height: 2px;
    background: $fun-yellow-color;
  }

  .before {

  }

  .after {

  }

  .text {
    color: #333;
    font-weight: bold;
    font-size: 16px;
    padding: 0 8px;
  }
}


.fun-goods{
  &-list{
    display: flex;
  }
  &-col{
    flex: 1;
  }

}


::-webkit-scrollbar {
  width: 0;
  height: 0;
  color: transparent;
}


@keyframes zy {
  10% {
    transform: rotate(25deg);
  }
  20% {
    transform: rotate(-20deg);
  }
  30% {
    transform: rotate(10deg);
  }
  40% {
    transform: rotate(-10deg);
  }
  50%, 100% {
    transform: rotate(0deg);
  }
}

.fun-tab{
  padding: 10px 0;
  background: white;
  &-title{
    padding: 10px;
    font-size: 18px;
  }
  &-nav{
    padding: 0 10px;
    white-space: nowrap;
    overflow-y: hidden;
    overflow-x: scroll;

    /*吸顶样式*/
    &.sticky{
      position: fixed;
      top: 0;
      width: 750rpx;
      background: white;
    }
    .nav-item{
      font-size: 16px;
      padding: 10px 0;
      margin-right: 15px;
      color: #999;
      display: inline-block;
      &.active{
        color: #09BB07;
        border-bottom: 1px solid #09BB07;
      }
    }
    .nav-more{
      float: right;
      font-size: 14px;
      color: #666666;
      line-height: 41px;
      margin-right: 10px;

    }
    .more-icon{
      vertical-align: middle;

    }
  }
}

.fun-container {
  padding: 20rpx 0;
  display: flex;
  flex-wrap: wrap;

  &.sticky{
    padding-top: 96rpx;
    /*position: fixed;*/
    /*top: 96rpx;*/
    /*width: 750rpx;*/
    /*background: white;*/
  }


  &-item{
    width: 345rpx;
    margin: 0 0 20rpx 20rpx ;
    background: white;

    .vr{
      margin-bottom: 20rpx;
    }
    .thumb{
      width: 345rpx;
      height: 345rpx;
      background-repeat: no-repeat;
      background-size: cover;
      background-position: center;
    }
    .thumb-contain{
      background-size: contain;
    }
    .info{
      padding: 10rpx;
      .title{
        font-size: 16px;
        color: #333;
        margin: 10px 0;
        /*line-height: 1.2;*/
        /*height: 4px;*/
        text-overflow: ellipsis;
        overflow: hidden;
        white-space: nowrap;
      }
      .desc{
        font-size: 12px;
        line-height: 20px;
        color: #666;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        text-overflow: ellipsis;
        overflow: hidden;
        white-space: pre-line;
        /*white-space: nowrap;*/
        margin-bottom: 10px;
      }
      .marketprice{

      }
      .icon-money{
        display: inline-block;
        font-size: 12px;
        color: #666666;
      }
      .price{
        display: inline-block;
        color: #f44;
      }
      .price-box{
        font-size: 14px;
        padding: 0 0 10px 0;
      }
    }
  }
}

.container{
  background: white;

  &-title {
    width: 100%;
    height: 30px;
    margin: 35px auto;
    display: inline-block;
    margin-bottom: 20px;
    text-align: center;
    .line {
      display: inline-block;
      width: 43px;
      height: 4px;
      margin-bottom: 3px;
      background-repeat:no-repeat;
      background-size: 100% 100%;
      &.line-left{

        background-image: url() ;
      }
      &.line-right{
        background-image: url() ;

      }
    }
    .title-text {
      background: #fff;
      margin: 0px auto;
      width: 100%;
      height: 30px;
      line-height: 30px;
      overflow: hidden;
      font-weight: 600;
      font-size: 16px;
      color: #574324;
      text-align: center;
    }
  }
  &-box{

  }

  &-more {
    width: 100%;
    height: 30px;
    margin: 10px auto;
    display: inline-block;
    text-align: center;
    // margin-bottom: 20px;
    .line {
      display: inline-block;
      width: 43px;
      height: 4px;
      margin-bottom: 3px;
      background-repeat:no-repeat;
      background-size: 100% 100%;
      // &.line-left{

      //   background-image: url(~img/title_icon_03.png) ;
      // }
      // &.line-right{
      //   background-image: url(~img/title_icon_05.png) ;

      // }
    }
    .title-text {
      background: #fff;
      margin: 0px auto;
      width: 100%;
      height: 30px;
      line-height: 30px;
      overflow: hidden;
      //font-weight: 600;
      font-size: 14px;
      color: #38f;
      text-align: center;
    }
  }

}

.rich-text-box{
	width: 100%;
	overflow-x: hidden;
  line-height: 1.8;
  img{
	  max-width: 100%;
    vertical-align: top;
  }
  image{
    vertical-align: top;
	max-width: 100%;
  }
}

.share-box{
  position: absolute;
  right: 20px;
  top: 20px;
  background: rgba(0,0,0,.6);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  .share-icon{
    margin: 7px;
    width: 26px;
    height: 26px;
    /*opacity: 0.6;*/
  }
}


.graytext{
  color: #666;
}


.color-primary{
  color: $fun-primary-color;
}
.color-red{
  color: $fun-red-color;
}
.color-blue{
  color: $fun-blue-color;
}
.color-yellow{
  color: $fun-yellow-color;
}
.color-orange{
  color: $fun-orange-color;
}

.color-green{
  color: $fun-green-color;
}



.bg-color-primary{
  color: #fff;
  background-color: $fun-primary-color;
}
.bg-color-red{
  color: #fff;
  background-color: $fun-red-color;
}
.bg-color-blue{
  color: #fff;
  background-color: $fun-blue-color;
}
.bg-color-yellow{
  color: #fff;
  background-color: $fun-yellow-color;
}
.bg-color-orange{
  color: #fff;
  background-color: $fun-orange-color;
}



.fun-tag{
  align-items: center;
  padding: 0.2em 0.5em;
  color: #fff;
  font-size: 10px;
  line-height: normal;
  border-radius: 0.2em;
}

.fun-btn{
  position: relative;
  display: inline-block;
  box-sizing: border-box;
  height: 44px;
  line-height: 44px;
  margin: 0;
  padding: 0;
  font-size: 16px;
  text-align: center;
  border-radius: 2px;
  cursor: pointer;
  -webkit-transition: opacity 0.2s;
  transition: opacity 0.2s;
  -webkit-appearance: none;
  color: #fff;
  &.primary{
    border: 1px solid $fun-primary-color;
    background-color: $fun-primary-color;
  }
  &.small{
    height: 32px;
    line-height: 32px;
    padding: 0 8px;
    font-size: 12px;
  }
  &.mini{
    height: 24px;
    line-height: 24px;
    padding: 0 4px;
    font-size: 10px;
  }
}

.inline{
  display: inline;
}


.myCanvas {
  position: fixed;
  left: 100%;
  top: 0;
  background: white;
  border: 1px solid #e7e7e7;
  width: 750px;
  height: 3000px;
  z-index: -1;
}
